<?php
    $product_id = $_POST['product_id'];
    include_once('connect.php');
    $db = new database("SELECT * FROM product RIGHT JOIN categories 
                        ON product.cate_id = categories.cate_id
                        WHERE pro_id = ".$product_id);
    $arr['pro_info'] = $db->render();
    
    //echo('<pre>');
    //print_r($arr);
    echo(json_encode($arr));
?>